Skip to content

Conversation

@assagman
Copy link
Owner

Summary

  • wf-release: interactive version type selection via fzf
  • wf-publish: re-run failed publish workflow
  • wf-ci: trigger CI on current branch
  • wf-list: list recent workflow runs
  • wf-watch: watch workflow run progress

Usage

make wf-release    # fzf picker → optional custom version → trigger → watch
make wf-publish    # re-run failed publish
make wf-list       # list runs

- wf-release: interactive version type selection via fzf
- wf-publish: re-run failed publish workflow
- wf-ci: trigger CI on current branch
- wf-list: list recent workflow runs
- wf-watch: watch workflow run progress

Signed-off-by: assagman <[email protected]>
Copilot AI review requested due to automatic review settings January 15, 2026 21:50
@gemini-code-assist
Copy link

Summary of Changes

Hello @assagman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the developer experience by integrating GitHub Actions workflow management directly into the Makefile. It provides a set of new make targets that leverage the gh cli and fzf to offer interactive and streamlined ways to trigger, monitor, and manage various CI/CD workflows, improving efficiency for common development tasks.

Highlights

  • Interactive Release Trigger: Added wf-release target for interactively selecting release version types (patch, minor, major, auto) using fzf and triggering the release-pr.yml workflow, with an option for custom version input.
  • Workflow Management Targets: Introduced wf-publish to re-run failed release-publish.yml workflows, wf-ci to trigger ci.yml on the current branch, wf-list to view recent workflow runs, and wf-watch to monitor workflow progress.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@assagman assagman merged commit 2d60d2f into main Jan 15, 2026
5 checks passed
@assagman assagman deleted the feat/workflow-make-targets branch January 15, 2026 21:50
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several useful Makefile targets for interacting with GitHub Actions workflows using the gh CLI and fzf. The new targets for releasing, publishing, running CI, listing, and watching workflows are a great addition for developer convenience. My review focuses on improving the robustness of these new targets. I've pointed out a potential issue with handling cancellation in the interactive prompt and the fragility of using a fixed sleep duration, which could lead to race conditions.

# Trigger release PR workflow with interactive prompts
wf-release:
@TYPE=$$(echo -e "auto\npatch\nminor\nmajor" | fzf --prompt="Version type: " --height=6 --reverse); \
if [ "$$TYPE" = "auto" ]; then \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If the user cancels the fzf prompt on the previous line (e.g., by pressing Esc), the TYPE variable will be empty. The script currently doesn't handle this case and proceeds to trigger the workflow with an empty version_type, which could lead to unexpected behavior or workflow failure. You should add a check to ensure TYPE is not empty before proceeding.

	if [ -z "$$TYPE" ]; then exit 1; elif [ "$$TYPE" = "auto" ]; then \

Comment on lines +53 to +54
sleep 2; \
$(MAKE) wf-watch W=release-pr.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using a fixed sleep 2 introduces a potential race condition. If the GitHub API is slow to create the new workflow run, wf-watch might start watching an older run instead of the one just triggered. While this might work most of the time, it's not fully reliable. For a more robust solution, you might consider implementing a polling mechanism to wait for the new run to appear before watching it. However, given the context of a Makefile helper, this might be an acceptable trade-off for simplicity.

Comment on lines +61 to +62
@sleep 2
@$(MAKE) wf-watch W=release-publish.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to other workflow-triggering targets, using a fixed sleep 2 here introduces a potential race condition. The wf-watch command might end up watching the wrong workflow if the new run isn't available in the API within 2 seconds. This approach is not fully reliable, although it may be a reasonable trade-off for simplicity in a Makefile.

Comment on lines +67 to +68
@sleep 2
@$(MAKE) wf-watch W=ci.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of sleep 2 before watching the workflow creates a potential race condition. If the new workflow run isn't visible via the API within two seconds, wf-watch could attach to an older run. This is a fragile pattern, though it might be an acceptable simplification for a developer tool.

@github-actions github-actions bot mentioned this pull request Jan 15, 2026
3 tasks
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds five new Makefile targets to streamline GitHub Actions workflow management through the gh CLI and fzf for interactive selections.

Changes:

  • Added interactive workflow trigger commands (wf-release, wf-publish, wf-ci)
  • Added workflow monitoring commands (wf-list, wf-watch)
  • Integrated fzf for user-friendly version type selection in release workflows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +66
# Trigger CI workflow on current branch
wf-ci:
gh workflow run ci.yml --ref $(shell git branch --show-current)
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ci.yml workflow does not have workflow_dispatch trigger configured, so it cannot be manually triggered. The workflow only runs on push/pull_request events. Add workflow_dispatch: to the workflow's on: section in .github/workflows/ci.yml for this target to work.

Suggested change
# Trigger CI workflow on current branch
wf-ci:
gh workflow run ci.yml --ref $(shell git branch --show-current)
# Re-run CI workflow: make wf-ci [RUN=<run-id>]
wf-ci:
$(if $(RUN),\
gh run rerun $(RUN),\
gh run rerun --failed -w ci.yml)

Copilot uses AI. Check for mistakes.
# Workflows (requires gh cli + fzf)
# Trigger release PR workflow with interactive prompts
wf-release:
@TYPE=$$(echo -e "auto\npatch\nminor\nmajor" | fzf --prompt="Version type: " --height=6 --reverse); \
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing error handling if fzf is cancelled (Ctrl+C or ESC). When a user cancels fzf, TYPE will be empty and the workflow will still be triggered with an empty version type. Add a check after the fzf call to exit if TYPE is empty.

Suggested change
@TYPE=$$(echo -e "auto\npatch\nminor\nmajor" | fzf --prompt="Version type: " --height=6 --reverse); \
@TYPE=$$(echo -e "auto\npatch\nminor\nmajor" | fzf --prompt="Version type: " --height=6 --reverse); \
if [ -z "$$TYPE" ]; then \
echo "Release workflow cancelled."; \
exit 1; \
fi; \

Copilot uses AI. Check for mistakes.
Comment on lines +76 to +78
$(if $(RUN),\
gh run watch $(RUN),\
gh run watch $(shell gh run list $(if $(W),-w $(W)) -L 1 --json databaseId -q '.[0].databaseId'))
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command will fail silently if no workflow runs exist (the jq query '.[0].databaseId' returns null for empty arrays). Add error handling to check if a run exists before calling gh run watch.

Suggested change
$(if $(RUN),\
gh run watch $(RUN),\
gh run watch $(shell gh run list $(if $(W),-w $(W)) -L 1 --json databaseId -q '.[0].databaseId'))
@if [ -n "$(RUN)" ]; then \
gh run watch $(RUN); \
else \
RUN_ID=$$(gh run list $(if $(W),-w $(W)) -L 1 --json databaseId -q '.[0].databaseId'); \
if [ -z "$$RUN_ID" ]; then \
echo "No workflow runs found to watch." >&2; \
exit 1; \
fi; \
gh run watch $$RUN_ID; \
fi

Copilot uses AI. Check for mistakes.
assagman added a commit that referenced this pull request Jan 15, 2026
- Workflow now inserts new version AFTER [Unreleased], not before
- Fixed misplaced [Unreleased] section in CHANGELOG.md
- Added 0.10.2 entry for recent changes (#5, #6)
- Consolidated duplicate 0.10.1 entries

Signed-off-by: assagman <[email protected]>
assagman added a commit that referenced this pull request Jan 15, 2026
* chore(release): prepare v0.10.2

* fix(release): handle [Unreleased] section in changelog generation

- Workflow now inserts new version AFTER [Unreleased], not before
- Fixed misplaced [Unreleased] section in CHANGELOG.md
- Added 0.10.2 entry for recent changes (#5, #6)
- Consolidated duplicate 0.10.1 entries

Signed-off-by: assagman <[email protected]>

---------

Signed-off-by: assagman <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: assagman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants